<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a href="index.html">作业一</a>
<a href="index00.html">作业二</a>
<a href="index01.html">作业三</a>
<a href="index02.html">作业四</a>
<a href="index03.html">作业五</a>
<script>
    var arr = [4,0,7,9,0,0,2,6,0,3,1,0];
    var num = 0;
    function fac(arr,val){
        for(var i=0;i<arr.length;i++){
            if(arr[i] == val){
                arr.splice(i,1);
                i--;
            }
        }
        return arr;
    }
    fac(arr,0)
    document.write('要求将数组中的0去掉:'+arr);
</script>
</body>
</html>